import java.sql.*;

public class ReadRows
{
	public static void main(String[] args) throws Exception
	{
		Class.forName("org.apache.derby.jdbc.ClientDriver");
		
		String cstring = "jdbc:derby://localhost:1527/Personnel;user=sa;password=password";
		
		try (Connection conn = DriverManager.getConnection(cstring);)
		{
			Statement stmt = conn.createStatement();
			ResultSet rs = stmt.executeQuery("select * from employee");
			
			while (rs.next())
			{
				System.out.println (rs.getString(1) + "\t" + 
						rs.getString(2) + "\t" +
						rs.getString(3) + "\t" +
						rs.getString(4));
			}
		}

	}

}
